a few words about web development

Parse error: parse error, expecting `T_PAAMAYIM_NEKUDOTAYIM'

Another straight to the point solution
I just got this error. After doing some googling I found an explanation in Wikipedia:

"In PHP, the scope resolution operator is also called Paamayim Nekudotayim, which means "twice colon" or "double colon" in Hebrew. It may be helpful to note that in some cases this error may occur when the $ symbol is not included in the use of a variable."

"The name was introduced in the Israeli-developed[1] Zend Engine 0.5 used in PHP 3. Although it has been confusing to many developers, it is still being used in PHP 5"</em>

However it was not the case, as my code did not have any double colons (::) just as the second line of explanation says. The error message was pointing to the line:

foreach ($this->databases AS database)

As you can see this is wrong and it should be:

foreach ($this->databases AS $database)
($ added before word "database").

So I am posting it here in case someone might need it.

Comments